﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;

namespace DAL
{
	public partial class DBSession 
    {
        public int SaveChanges(string type)
        {
            return new DBContextFactory().GetDbContext(type).SaveChanges();
        }
      
       private	IObject_DAL iObject_DAL;
		public IObject_DAL IObject_DAL
		{
			get
			{
				if(iObject_DAL==null)
					iObject_DAL= new Object_DAL();
				return iObject_DAL;
			}
			set
			{
				iObject_DAL= value;
			}
		}
    }

	public partial class DBSession:IDBSession
    {

		#region 01 数据接口 IDeliveryPeriodType_DAL
	    private	IDeliveryPeriodType_DAL iDeliveryPeriodType_DAL;
		public IDeliveryPeriodType_DAL IDeliveryPeriodType_DAL
		{
			get
			{
				if(iDeliveryPeriodType_DAL==null)
					iDeliveryPeriodType_DAL= new DeliveryPeriodType_DAL();
				return iDeliveryPeriodType_DAL;
			}
			set
			{
				iDeliveryPeriodType_DAL= value;
			}
		}
		#endregion

		#region 02 数据接口 IDistributeArea_DAL
	    private	IDistributeArea_DAL iDistributeArea_DAL;
		public IDistributeArea_DAL IDistributeArea_DAL
		{
			get
			{
				if(iDistributeArea_DAL==null)
					iDistributeArea_DAL= new DistributeArea_DAL();
				return iDistributeArea_DAL;
			}
			set
			{
				iDistributeArea_DAL= value;
			}
		}
		#endregion

		#region 03 数据接口 IDistributeAreaStock_DAL
	    private	IDistributeAreaStock_DAL iDistributeAreaStock_DAL;
		public IDistributeAreaStock_DAL IDistributeAreaStock_DAL
		{
			get
			{
				if(iDistributeAreaStock_DAL==null)
					iDistributeAreaStock_DAL= new DistributeAreaStock_DAL();
				return iDistributeAreaStock_DAL;
			}
			set
			{
				iDistributeAreaStock_DAL= value;
			}
		}
		#endregion

		#region 04 数据接口 IMaterial_DAL
	    private	IMaterial_DAL iMaterial_DAL;
		public IMaterial_DAL IMaterial_DAL
		{
			get
			{
				if(iMaterial_DAL==null)
					iMaterial_DAL= new Material_DAL();
				return iMaterial_DAL;
			}
			set
			{
				iMaterial_DAL= value;
			}
		}
		#endregion

		#region 05 数据接口 IMaterialCategory_DAL
	    private	IMaterialCategory_DAL iMaterialCategory_DAL;
		public IMaterialCategory_DAL IMaterialCategory_DAL
		{
			get
			{
				if(iMaterialCategory_DAL==null)
					iMaterialCategory_DAL= new MaterialCategory_DAL();
				return iMaterialCategory_DAL;
			}
			set
			{
				iMaterialCategory_DAL= value;
			}
		}
		#endregion

		#region 06 数据接口 IMaterialProperty_DAL
	    private	IMaterialProperty_DAL iMaterialProperty_DAL;
		public IMaterialProperty_DAL IMaterialProperty_DAL
		{
			get
			{
				if(iMaterialProperty_DAL==null)
					iMaterialProperty_DAL= new MaterialProperty_DAL();
				return iMaterialProperty_DAL;
			}
			set
			{
				iMaterialProperty_DAL= value;
			}
		}
		#endregion

		#region 07 数据接口 IMaterialSupplier_DAL
	    private	IMaterialSupplier_DAL iMaterialSupplier_DAL;
		public IMaterialSupplier_DAL IMaterialSupplier_DAL
		{
			get
			{
				if(iMaterialSupplier_DAL==null)
					iMaterialSupplier_DAL= new MaterialSupplier_DAL();
				return iMaterialSupplier_DAL;
			}
			set
			{
				iMaterialSupplier_DAL= value;
			}
		}
		#endregion

		#region 08 数据接口 IMaterialType_DAL
	    private	IMaterialType_DAL iMaterialType_DAL;
		public IMaterialType_DAL IMaterialType_DAL
		{
			get
			{
				if(iMaterialType_DAL==null)
					iMaterialType_DAL= new MaterialType_DAL();
				return iMaterialType_DAL;
			}
			set
			{
				iMaterialType_DAL= value;
			}
		}
		#endregion

		#region 09 数据接口 IPaymentType_DAL
	    private	IPaymentType_DAL iPaymentType_DAL;
		public IPaymentType_DAL IPaymentType_DAL
		{
			get
			{
				if(iPaymentType_DAL==null)
					iPaymentType_DAL= new PaymentType_DAL();
				return iPaymentType_DAL;
			}
			set
			{
				iPaymentType_DAL= value;
			}
		}
		#endregion

		#region 10 数据接口 IProduct_DAL
	    private	IProduct_DAL iProduct_DAL;
		public IProduct_DAL IProduct_DAL
		{
			get
			{
				if(iProduct_DAL==null)
					iProduct_DAL= new Product_DAL();
				return iProduct_DAL;
			}
			set
			{
				iProduct_DAL= value;
			}
		}
		#endregion

		#region 11 数据接口 IProductCategory_DAL
	    private	IProductCategory_DAL iProductCategory_DAL;
		public IProductCategory_DAL IProductCategory_DAL
		{
			get
			{
				if(iProductCategory_DAL==null)
					iProductCategory_DAL= new ProductCategory_DAL();
				return iProductCategory_DAL;
			}
			set
			{
				iProductCategory_DAL= value;
			}
		}
		#endregion

		#region 12 数据接口 IProductConfig_DAL
	    private	IProductConfig_DAL iProductConfig_DAL;
		public IProductConfig_DAL IProductConfig_DAL
		{
			get
			{
				if(iProductConfig_DAL==null)
					iProductConfig_DAL= new ProductConfig_DAL();
				return iProductConfig_DAL;
			}
			set
			{
				iProductConfig_DAL= value;
			}
		}
		#endregion

		#region 13 数据接口 IProductCost_DAL
	    private	IProductCost_DAL iProductCost_DAL;
		public IProductCost_DAL IProductCost_DAL
		{
			get
			{
				if(iProductCost_DAL==null)
					iProductCost_DAL= new ProductCost_DAL();
				return iProductCost_DAL;
			}
			set
			{
				iProductCost_DAL= value;
			}
		}
		#endregion

		#region 14 数据接口 IProductInfo_DAL
	    private	IProductInfo_DAL iProductInfo_DAL;
		public IProductInfo_DAL IProductInfo_DAL
		{
			get
			{
				if(iProductInfo_DAL==null)
					iProductInfo_DAL= new ProductInfo_DAL();
				return iProductInfo_DAL;
			}
			set
			{
				iProductInfo_DAL= value;
			}
		}
		#endregion

		#region 15 数据接口 IProductMaterial_DAL
	    private	IProductMaterial_DAL iProductMaterial_DAL;
		public IProductMaterial_DAL IProductMaterial_DAL
		{
			get
			{
				if(iProductMaterial_DAL==null)
					iProductMaterial_DAL= new ProductMaterial_DAL();
				return iProductMaterial_DAL;
			}
			set
			{
				iProductMaterial_DAL= value;
			}
		}
		#endregion

		#region 16 数据接口 IProductPackageInfo_DAL
	    private	IProductPackageInfo_DAL iProductPackageInfo_DAL;
		public IProductPackageInfo_DAL IProductPackageInfo_DAL
		{
			get
			{
				if(iProductPackageInfo_DAL==null)
					iProductPackageInfo_DAL= new ProductPackageInfo_DAL();
				return iProductPackageInfo_DAL;
			}
			set
			{
				iProductPackageInfo_DAL= value;
			}
		}
		#endregion

		#region 17 数据接口 IProductProperty_DAL
	    private	IProductProperty_DAL iProductProperty_DAL;
		public IProductProperty_DAL IProductProperty_DAL
		{
			get
			{
				if(iProductProperty_DAL==null)
					iProductProperty_DAL= new ProductProperty_DAL();
				return iProductProperty_DAL;
			}
			set
			{
				iProductProperty_DAL= value;
			}
		}
		#endregion

		#region 18 数据接口 IProductSpec_DAL
	    private	IProductSpec_DAL iProductSpec_DAL;
		public IProductSpec_DAL IProductSpec_DAL
		{
			get
			{
				if(iProductSpec_DAL==null)
					iProductSpec_DAL= new ProductSpec_DAL();
				return iProductSpec_DAL;
			}
			set
			{
				iProductSpec_DAL= value;
			}
		}
		#endregion

		#region 19 数据接口 IProductStatu_DAL
	    private	IProductStatu_DAL iProductStatu_DAL;
		public IProductStatu_DAL IProductStatu_DAL
		{
			get
			{
				if(iProductStatu_DAL==null)
					iProductStatu_DAL= new ProductStatu_DAL();
				return iProductStatu_DAL;
			}
			set
			{
				iProductStatu_DAL= value;
			}
		}
		#endregion

		#region 20 数据接口 IPurchaseMode_DAL
	    private	IPurchaseMode_DAL iPurchaseMode_DAL;
		public IPurchaseMode_DAL IPurchaseMode_DAL
		{
			get
			{
				if(iPurchaseMode_DAL==null)
					iPurchaseMode_DAL= new PurchaseMode_DAL();
				return iPurchaseMode_DAL;
			}
			set
			{
				iPurchaseMode_DAL= value;
			}
		}
		#endregion

		#region 21 数据接口 IPurchaseModeSection_DAL
	    private	IPurchaseModeSection_DAL iPurchaseModeSection_DAL;
		public IPurchaseModeSection_DAL IPurchaseModeSection_DAL
		{
			get
			{
				if(iPurchaseModeSection_DAL==null)
					iPurchaseModeSection_DAL= new PurchaseModeSection_DAL();
				return iPurchaseModeSection_DAL;
			}
			set
			{
				iPurchaseModeSection_DAL= value;
			}
		}
		#endregion

		#region 22 数据接口 IPurchaseType_DAL
	    private	IPurchaseType_DAL iPurchaseType_DAL;
		public IPurchaseType_DAL IPurchaseType_DAL
		{
			get
			{
				if(iPurchaseType_DAL==null)
					iPurchaseType_DAL= new PurchaseType_DAL();
				return iPurchaseType_DAL;
			}
			set
			{
				iPurchaseType_DAL= value;
			}
		}
		#endregion

		#region 23 数据接口 IStock_DAL
	    private	IStock_DAL iStock_DAL;
		public IStock_DAL IStock_DAL
		{
			get
			{
				if(iStock_DAL==null)
					iStock_DAL= new Stock_DAL();
				return iStock_DAL;
			}
			set
			{
				iStock_DAL= value;
			}
		}
		#endregion

		#region 24 数据接口 ISupplier_DAL
	    private	ISupplier_DAL iSupplier_DAL;
		public ISupplier_DAL ISupplier_DAL
		{
			get
			{
				if(iSupplier_DAL==null)
					iSupplier_DAL= new Supplier_DAL();
				return iSupplier_DAL;
			}
			set
			{
				iSupplier_DAL= value;
			}
		}
		#endregion

		#region 25 数据接口 ISupplierBankCard_DAL
	    private	ISupplierBankCard_DAL iSupplierBankCard_DAL;
		public ISupplierBankCard_DAL ISupplierBankCard_DAL
		{
			get
			{
				if(iSupplierBankCard_DAL==null)
					iSupplierBankCard_DAL= new SupplierBankCard_DAL();
				return iSupplierBankCard_DAL;
			}
			set
			{
				iSupplierBankCard_DAL= value;
			}
		}
		#endregion

		#region 26 数据接口 ISupplierModeType_DAL
	    private	ISupplierModeType_DAL iSupplierModeType_DAL;
		public ISupplierModeType_DAL ISupplierModeType_DAL
		{
			get
			{
				if(iSupplierModeType_DAL==null)
					iSupplierModeType_DAL= new SupplierModeType_DAL();
				return iSupplierModeType_DAL;
			}
			set
			{
				iSupplierModeType_DAL= value;
			}
		}
		#endregion

		#region 27 数据接口 IView_Category_DAL
	    private	IView_Category_DAL iView_Category_DAL;
		public IView_Category_DAL IView_Category_DAL
		{
			get
			{
				if(iView_Category_DAL==null)
					iView_Category_DAL= new View_Category_DAL();
				return iView_Category_DAL;
			}
			set
			{
				iView_Category_DAL= value;
			}
		}
		#endregion

		#region 28 数据接口 IView_CategorySpecifics_DAL
	    private	IView_CategorySpecifics_DAL iView_CategorySpecifics_DAL;
		public IView_CategorySpecifics_DAL IView_CategorySpecifics_DAL
		{
			get
			{
				if(iView_CategorySpecifics_DAL==null)
					iView_CategorySpecifics_DAL= new View_CategorySpecifics_DAL();
				return iView_CategorySpecifics_DAL;
			}
			set
			{
				iView_CategorySpecifics_DAL= value;
			}
		}
		#endregion

		#region 29 数据接口 IView_Contraband_DAL
	    private	IView_Contraband_DAL iView_Contraband_DAL;
		public IView_Contraband_DAL IView_Contraband_DAL
		{
			get
			{
				if(iView_Contraband_DAL==null)
					iView_Contraband_DAL= new View_Contraband_DAL();
				return iView_Contraband_DAL;
			}
			set
			{
				iView_Contraband_DAL= value;
			}
		}
		#endregion

		#region 30 数据接口 IView_Currency_DAL
	    private	IView_Currency_DAL iView_Currency_DAL;
		public IView_Currency_DAL IView_Currency_DAL
		{
			get
			{
				if(iView_Currency_DAL==null)
					iView_Currency_DAL= new View_Currency_DAL();
				return iView_Currency_DAL;
			}
			set
			{
				iView_Currency_DAL= value;
			}
		}
		#endregion

		#region 31 数据接口 IView_Measure_DAL
	    private	IView_Measure_DAL iView_Measure_DAL;
		public IView_Measure_DAL IView_Measure_DAL
		{
			get
			{
				if(iView_Measure_DAL==null)
					iView_Measure_DAL= new View_Measure_DAL();
				return iView_Measure_DAL;
			}
			set
			{
				iView_Measure_DAL= value;
			}
		}
		#endregion

		#region 32 数据接口 IView_ProductSpec_DAL
	    private	IView_ProductSpec_DAL iView_ProductSpec_DAL;
		public IView_ProductSpec_DAL IView_ProductSpec_DAL
		{
			get
			{
				if(iView_ProductSpec_DAL==null)
					iView_ProductSpec_DAL= new View_ProductSpec_DAL();
				return iView_ProductSpec_DAL;
			}
			set
			{
				iView_ProductSpec_DAL= value;
			}
		}
		#endregion

		#region 33 数据接口 IView_ProductStatus_DAL
	    private	IView_ProductStatus_DAL iView_ProductStatus_DAL;
		public IView_ProductStatus_DAL IView_ProductStatus_DAL
		{
			get
			{
				if(iView_ProductStatus_DAL==null)
					iView_ProductStatus_DAL= new View_ProductStatus_DAL();
				return iView_ProductStatus_DAL;
			}
			set
			{
				iView_ProductStatus_DAL= value;
			}
		}
		#endregion

		#region 34 数据接口 IView_Specifics_DAL
	    private	IView_Specifics_DAL iView_Specifics_DAL;
		public IView_Specifics_DAL IView_Specifics_DAL
		{
			get
			{
				if(iView_Specifics_DAL==null)
					iView_Specifics_DAL= new View_Specifics_DAL();
				return iView_Specifics_DAL;
			}
			set
			{
				iView_Specifics_DAL= value;
			}
		}
		#endregion

		#region 35 数据接口 IView_SpecificsValue_DAL
	    private	IView_SpecificsValue_DAL iView_SpecificsValue_DAL;
		public IView_SpecificsValue_DAL IView_SpecificsValue_DAL
		{
			get
			{
				if(iView_SpecificsValue_DAL==null)
					iView_SpecificsValue_DAL= new View_SpecificsValue_DAL();
				return iView_SpecificsValue_DAL;
			}
			set
			{
				iView_SpecificsValue_DAL= value;
			}
		}
		#endregion

		#region 36 数据接口 IView_Value_DAL
	    private	IView_Value_DAL iView_Value_DAL;
		public IView_Value_DAL IView_Value_DAL
		{
			get
			{
				if(iView_Value_DAL==null)
					iView_Value_DAL= new View_Value_DAL();
				return iView_Value_DAL;
			}
			set
			{
				iView_Value_DAL= value;
			}
		}
		#endregion

    }

}